package com.ncu.cloundeoffice.service.impl;

import com.ncu.cloundeoffice.mapper.TPositionMapper;
import com.ncu.cloundeoffice.pojo.TPosition;
import com.ncu.cloundeoffice.service.TPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TPositionServiceImpl implements TPositionService {

    @Autowired
    private TPositionMapper tPositionMapper;

    /**
     * 删除职位
     * @param id
     * @return
     */
    @Override
    public int deleteTPosition(int id) {
        return tPositionMapper.deleteTPosition(id);
    }

    /**
     * 修改职位
     * @return
     */
    @Override
    public int updateTPosition(TPosition tPosition) {
        return tPositionMapper.updateTPosition(tPosition);
    }

    /**
     * 添加职位
     * @param tPosition
     * @return
     */
    @Override
    public int addTPosition(TPosition tPosition) {
        return tPositionMapper.addTPosition(tPosition);
    }

    /**
     * 查询所有职位
     * @return
     */
    @Override
    public List<TPosition> getAllTPosition() {
        return tPositionMapper.getAllTPosition();
    }

    /**
     * 批量删除职位
     * @param ids
     * @return
     */
    @Override
    public int deleteTPositionByIds(int[] ids) {
        return tPositionMapper.deleteTPositionByIds(ids);
    }
}
